<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace app\massage\model;

class ShopGoods extends \app\BaseModel
{
    protected $name = "massage_service_shop_goods";
    public static function getInfo($where, $field = "")
    {
        return self::where($where)->field($field)->find();
    }
    public static function getList($where, $page = 10)
    {
        return self::where($where)->field("name,carte,cover,price,sort,status,id,create_time")->order("sort desc,create_time desc")->paginate($page)->each(function ($item) {
            $item["create_time"] = date("Y-m-d H:i:s", $item["create_time"]);
            $carte = ShopCarte::where("id", "in", explode(",", $item["carte"]))->column("name");
            $item["carte"] = implode(",", $carte);
            return $item;
        })->toArray();
    }
}

?>